<!DOCTYPE html>
<html>
<html lang="en">
<head>
    <meta charset="UTF-8">
   <title>掌行通－运营平台登录</title>
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js"></script>
      <script src="/bootstrap/js/bootstrap.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-3">
  <form class="form-horizontal" role="form" action="" method="post">
  <div class="form-group">
    <label class="col-sm-2 control-label">用户名</label>
    <div class="col-sm-3">
     <input type="text" class="form-control" id="username" name="username"
         placeholder="请输入用户名">
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword" class="col-sm-2 control-label">密码</label>
    <div class="col-sm-3">
      <input type="password" class="form-control" id="inputPassword" name="password"
         placeholder="请输入密码">

    </div>
  </div>

  <div class="form-group">
    <label class="col-sm-2 control-label">验证码</label>
    <div class="col-sm-3">
{##}
{#      <input type="text" class="form-control" id="id_captcha" name="captcha" placeholder="请输入验证码">#}
{#        <img src={{ imgage_url }} alt="captcha" class="captcha" />#}
{{ form.captcha }}
   <script type="text/javascript">
    $('.captcha').click(function(){ //点击图片刷新
        var tmp = Math.random().toString();
        $.get("?newsn=1&tmp="+tmp, function(result){

            $('.captcha').attr("src", result);
            $('#id_captcha_0').attr("value", result.split('/')[3]);
        });
    return false;
});
</script>

    </div>
  </div>

</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-4">
     <div class="form-group">
         <div class="col-sm-2">
     <button type="submit" class="btn btn-default" value="login">提交</button>
{#    <input type="submit" value="login" />#}
</form>
             {% if login_err %}
             <p>{{ login_err }}<p>
<script language="javascript"> //JavaScript脚本标注
alert("{{ login_err }}");

</script>

{% endif %}
</div>
</div>

</div>
</body>
</html>